# encoding: utf-8

from django.db import models

# Create your models here.


class Classify(models.Model):
    content = models.CharField(max_length=100)

class Tag(models.Model):
    content = models.CharField(max_length=100)
      
class Blog(models.Model):
    title = models.CharField(max_length=100)
    content = models.TextField()
    summary = models.TextField()
    time = models.DateField()
    type = models.IntegerField(max_length=1)
    release = models.IntegerField(max_length=1)
    classify = models.ForeignKey(Classify,related_name="classify_blog")
    #user = models.ForeignKey(User,related_name="user_blog");
    user_id = models.IntegerField(max_length=3)
    tag = models.ManyToManyField(Tag)
     
class Comment(models.Model):
    name = models.CharField(max_length=45)
    website = models.CharField(max_length=100)
    message = models.TextField()
    blog_id = models.IntegerField(max_length=11)
    time = models.DateField()
    
class Filing(models.Model):
    month = models.DateField()
    count = models.IntegerField(max_length=11)
